/*
 * @author: Gene
 * @age: 永远18岁的美少年
 * @Email：: yangjianyun@58.com
 * @Date: 2021-12-02 21:34:21
 * @LastEditTime: 2021-12-02 22:12:21
 * @description: $1
 */

export {}

type RepeatString<T extends string,  K,  A extends any[] = [],
  Prev extends string = ""
> = K extends A["length"]
  ? Prev
  : RepeatString<T, K, [...A, null], `${Prev}${T}`>

type A = RepeatString<"a", 3> // 'aaa'
type B = RepeatString<"a", 0> // ''

